﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;

    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Core
{
    /// <summary>
    /// Base name/value list class that all enumerated business object types should inherit from.
    /// </summary>
    /// <typeparam name="K">Type used to key the map</typeparam>
    /// <typeparam name="V">Value type stored in the map</typeparam>
    [Serializable]
    public abstract class MarketPulseNameValueListBase<K, V> : NameValueListBase<K, V>
    {

        ///// <summary>
        ///// Get a Key from the Key Value pair based on the value supplied
        ///// </summary>
        ///// <param name="value">The value to use</param>
        ///// <returns object.</returns>
        //public K this[V value]
        //{
        //    get
        //    {
        //        return this.Where(st => st.Value.Equals(value)).FirstOrDefault().Key;
        //    }
        //}

        //public K GetByValue(V value)
        //{
        //    return this.Where(st => st.Value.Equals(value)).FirstOrDefault().Key;
        //}

        ///// <summary>
        ///// Get a Key from the Key Value pair based on the value supplied
        ///// </summary>
        ///// <param name="value">The value to use</param>
        ///// <returns object.</returns>
        //public V this[K value]
        //{
        //    get
        //    {
        //        return this.Where(st => st.Key.Equals(value)).FirstOrDefault().Value;
        //    }
        //}

    }
}
